package com.iflytek.yly.jetpackdemo.room;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.iflytek.yly.jetpackdemo.R;

import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;

import java.util.List;

public class StudentAdapter extends BaseQuickAdapter<Student, BaseViewHolder> {

    public StudentAdapter(int layoutResId, @Nullable List<Student> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NotNull BaseViewHolder baseViewHolder, Student student) {
        baseViewHolder.setText(R.id.tvId,student.id);
        baseViewHolder.setText(R.id.tvName,student.name);
        baseViewHolder.setText(R.id.tvAge,student.age);
    }
}
